package com.workplan.client.widgets.tabs;

import com.general.client.action.ActionHandler;
import com.general.client.basewidget.BaseWidget;
import com.general.client.widgets.button.tab.TabButton;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.HandlerRegistration;
import com.workplan.client.bundle.WorkPlanBundle;

public class PlanShiftsTab extends BaseWidget implements TabPresenter.Display {

	WorkPlanBundle bundle = GWT.create(WorkPlanBundle.class);

	TabButton tabButton = new TabButton();

	public PlanShiftsTab() {
		initWidget(tabButton);
		tabButton.setIconUrl(bundle.tabPlanShiftsIcon().getURL());
		tabButton.setTabTitle("Plan");
		tabButton.setTabSubtitle("shifts");

	}

	@Override
	public HandlerRegistration addActionHandler(ActionHandler handler) {
		return tabButton.addActionHandler(handler);
	}

	@Override
	public void setSelected(boolean selected) {
		tabButton.setSelected(selected);
	}
}
